Skip to content

Fix ReverseInterfaceTest.handle_program_state#430

Open
urfeex wants to merge 4 commits intoUniversalRobots:masterfrom
urfeex:fix_handle_program_state_test
Open

Fix ReverseInterfaceTest.handle_program_state#430
urfeex wants to merge 4 commits intoUniversalRobots:masterfrom
urfeex:fix_handle_program_state_test

Conversation

@urfeex
Copy link
Member

@urfeex urfeex commented Feb 9, 2026

Attempting to fix thread synchronization. I'm not entirely sure that that's the problem as I cannot reprocude things locally and the output suggests that there's a client connecting twice, but it's something that could be fixed.


Note

Low Risk
Test-only synchronization changes; low product risk, with the main risk being potential remaining flakiness/timeouts in CI due to timing assumptions.

Overview
Fixes flakiness in ReverseIntefaceTest.handle_program_state by tightening thread synchronization around program-state notifications.

handleProgramState now marks when a new state is received, and waitForProgramState returns immediately if the expected state is already set; otherwise it loops with a predicate-based condition_variable wait and re-checks state until the timeout expires.

Written by Cursor Bugbot for commit 5237abb. This will update automatically on new commits. Configure here.

@urfeex urfeex added the CI label Feb 9, 2026
@urfeex
Copy link
Member Author

urfeex commented Feb 9, 2026

bugbot run

@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

❌ Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.24%. Comparing base (7b57b66) to head (6aafbbd).

Files with missing lines Patch % Lines
src/comm/tcp_server.cpp 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #430      +/-   ##
==========================================
- Coverage   76.33%   76.24%   -0.09%     
==========================================
  Files         104      105       +1     
  Lines        5531     5536       +5     
  Branches      594      593       -1     
==========================================
- Hits         4222     4221       -1     
- Misses       1010     1016       +6     
  Partials      299      299              
Flag Coverage Δ
start_ursim 83.94% <ø> (+1.33%) ⬆️
ur20-latest 68.71% <77.77%> (+0.01%) ⬆️
ur5-3.14.3 71.88% <77.77%> (+0.07%) ⬆️
ur5e-10.11.0 64.58% <77.77%> (-0.13%) ⬇️
ur5e-10.12.0 65.85% <77.77%> (-0.35%) ⬇️
ur5e-10.7.0 64.04% <77.77%> (-0.38%) ⬇️
ur5e-5.9.4 72.41% <77.77%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on February 20

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@urfeex urfeex force-pushed the fix_handle_program_state_test branch from 59dc57e to 67fe8fa Compare February 11, 2026 14:05
@urfeex urfeex force-pushed the fix_handle_program_state_test branch 3 times, most recently from 6aa92b7 to d2bde41 Compare February 26, 2026 08:56
Attempting to fix thread synchronization. I'm not entirely sure that
that's the problem as I cannot reprocude things locally and the output
suggests that there's a client connecting twice, but it's something that
could be fixed.
In order to avoid any undesired interference, we move the test away from
the default port.
This reverts commit 6aa92b7.
@urfeex urfeex force-pushed the fix_handle_program_state_test branch from d2bde41 to 6aafbbd Compare February 26, 2026 10:17
@urfeex urfeex marked this pull request as ready for review February 26, 2026 10:42
@urfeex urfeex requested a review from a team February 26, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant